/*
 * Copyright Levi9 Global Sourcing 2009
 */
package master.ghrm.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToOne;

@Entity
public class Contact extends AbstractBaseEntity {

	private static final long serialVersionUID = 1L;

	public static final int PHONE_LENGTH = 80;
	public static final int EMAIL_LENGTH = 80;
	public static final int MESSENGER_ID_LENGTH = 50;
	public static final int OFFICE_ROOM_NUMBER_LENGTH = 255;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "contact_id", unique = true, nullable = false)
	private Integer contactId;

	@Column(name = "phone_home", length = PHONE_LENGTH)
	private String phoneHome;

	@Column(name = "phone_mobile", length = PHONE_LENGTH)
	private String phoneMobile;

	@Column(name = "phone_office", length = PHONE_LENGTH)
	private String phoneOffice;

	@Column(name = "business_mobile", length = PHONE_LENGTH)
	private String businessMobile;

	@Column(name = "email_office", length = EMAIL_LENGTH)
	private String emailOffice;

	@Column(name = "email_home", length = EMAIL_LENGTH)
	private String emailHome;

	@Column(name = "skype_id", length = MESSENGER_ID_LENGTH)
	private String skypeId;

	@Column(name = "msn_id", length = MESSENGER_ID_LENGTH)
	private String msnId;

	@Column(name = "voip_id", length = MESSENGER_ID_LENGTH)
	private String voipId;

	@OneToOne(mappedBy = "contact", fetch = FetchType.LAZY)
	private Profile profile;

	@Column(name = "office_room_number", nullable = true, length = OFFICE_ROOM_NUMBER_LENGTH)
	private String officeRoomNumber;

	/**
	 * default constructor
	 */
	public Contact() {
	}

	/**
	 * For persistence use only.
	 * 
	 * @param aContactId ID.
	 */
	public void setContactId(Integer aContactId) {
		this.contactId = aContactId;
	}

	/**
	 * @return ID
	 */
	public Integer getContactId() {
		return contactId;
	}

	/**
	 * Gets the phone home.
	 * 
	 * @return the phone home
	 */
	public String getPhoneHome() {
		return phoneHome;
	}

	/**
	 * Sets the phone home.
	 * 
	 * @param aPhoneHome the new phone home
	 */
	public void setPhoneHome(String aPhoneHome) {
		this.phoneHome = aPhoneHome;
	}

	/**
	 * Gets the phone mobile.
	 * 
	 * @return the phone mobile
	 */
	public String getPhoneMobile() {
		return phoneMobile;
	}

	/**
	 * Sets the phone mobile.
	 * 
	 * @param aPhoneMobile the new phone mobile
	 */
	public void setPhoneMobile(String aPhoneMobile) {
		this.phoneMobile = aPhoneMobile;
	}

	/**
	 * @return office phone number.
	 */
	public String getPhoneOffice() {
		return phoneOffice;
	}

	/**
	 * @param aPhoneOffice office phone number.
	 */
	public void setPhoneOffice(String aPhoneOffice) {
		this.phoneOffice = aPhoneOffice;
	}

	/**
	 * Gets the email office.
	 * 
	 * @return the email office
	 */
	public String getEmailOffice() {
		return emailOffice;
	}

	/**
	 * Sets the email office.
	 * 
	 * @param anEmailOffice the new email office
	 */
	public void setEmailOffice(String anEmailOffice) {
		this.emailOffice = anEmailOffice;
	}

	/**
	 * Gets the email home.
	 * 
	 * @return the email home
	 */
	public String getEmailHome() {
		return emailHome;
	}

	/**
	 * Sets the email home.
	 * 
	 * @param aEmailHome the new email home
	 */
	public void setEmailHome(String aEmailHome) {
		this.emailHome = aEmailHome;
	}

	/**
	 * Gets the skype id.
	 * 
	 * @return the skype id
	 */
	public String getSkypeId() {
		return skypeId;
	}

	/**
	 * Sets the skype id.
	 * 
	 * @param aSkypeId the new skype id
	 */
	public void setSkypeId(String aSkypeId) {
		this.skypeId = aSkypeId;
	}

	/**
	 * Gets the msn id.
	 * 
	 * @return the msn id
	 */
	public String getMsnId() {
		return msnId;
	}

	/**
	 * Sets the msn id.
	 * 
	 * @param aMsnId the new msn id
	 */
	public void setMsnId(String aMsnId) {
		this.msnId = aMsnId;
	}

	/**
	 * @return the voipId
	 */
	public String getVoipId() {
		return voipId;
	}

	/**
	 * @param aVoipId the voipId to set
	 */
	public void setVoipId(String aVoipId) {
		this.voipId = aVoipId;
	}

	/**
	 * @return profile associated with this contact.
	 */
	public Profile getProfile() {
		return profile;
	}

	/**
	 * @param aProfile profile associated with this contact.
	 */
	public void setProfile(Profile aProfile) {
		this.profile = aProfile;
	}

	/**
	 * @return the officeRoomNumber
	 */
	public String getOfficeRoomNumber() {
		return officeRoomNumber;
	}

	/**
	 * @param anOfficeRoomNumber the officeRoomNumber to set
	 */
	public void setOfficeRoomNumber(String anOfficeRoomNumber) {
		this.officeRoomNumber = anOfficeRoomNumber;
	}

	/**
	 * @return the businessMobile
	 */
	public String getBusinessMobile() {
		return businessMobile;
	}

	/**
	 * @param aBusinessMobile the businessMobile to set
	 */
	public void setBusinessMobile(String aBusinessMobile) {
		this.businessMobile = aBusinessMobile;
	}

	/**
	 * @see com.levi9.hrm.model.base.AbstractBaseEntity#defineExcludedAttributes()
	 */
	@Override
	protected String[] getExcludedAttributes() {
		return new String[] {};
	}
}
